package com.hzp.lolnews.activity.model;

import android.content.Context;

import cn.bmob.v3.BmobUser;
import cn.bmob.v3.listener.SaveListener;

public class RegisterBiz implements IUserRegisterBiz {


    @Override
    public void register(Context context,String name, String pwd, String yzn,final OnRegisterListener listener) {
        // 使用BmobSDK提供的注册功能
        BmobUser user = new BmobUser();
        user.setUsername(name);
        user.setPassword(pwd);
        user.login(context, new SaveListener() {
            @Override
            public void onSuccess() {
                listener.registerSucceed();
            }

            @Override
            public void onFailure(int i, String s) {
                listener.registerFailed();
            }


        });
    }
}
